﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace OnlineLearningSystem.Model
{
    /// <summary>
    /// 批次表
    /// </summary>
    public class Batch :EntityBase
    {

        /// <summary>
        /// 批次名
        /// </summary>
        [Display(Name = "批次名")]
        [StringLength(10)]
        public string batchName { get; set; }

        /// <summary>
        /// 开始时间
        /// </summary>
        [Display(Name = "开始时间")]
        public DateTime beginTime { get; set; }

        /// <summary>
        /// 结束时间
        /// </summary>
        [Display(Name = "结束时间")]
        public DateTime endTime { get; set; }

        /// <summary>
        /// 枚举状态0=="结束"，1=="进行中"
        /// </summary>
        [Display(Name = "状态")]
        public int state { get; set; }

        /// <summary>
        /// 一个批次对应多个用户
        /// </summary>
        public virtual IList<User> Users { get; set; }

        /// <summary>
        /// 一个批次对应多个课程
        /// </summary>
        public virtual IList<Course> Courses { get; set; }
    }
}
